import {
  onShowTimes
} from '../../utils/date.js'
Page({

  data: {
    carousel: [{
      color: '#ccc'
    }, {
      color: '#ddd'
    }, {
      color: '#f5f5f5'
    }],
    showBtn: false
  },
  onPageScroll(e) {
    let scrollTop = e.scrollTop;
    if (scrollTop >= 350) this.setData({
      showBtn: true
    })
    else this.setData({
      showBtn: false
    })
  },
  onLoad: function(options) {
    this.cSearch = this.selectComponent("#cSearch");
  },
  onReady: function() {

  },
  goSearch(e){
    this.cSearch.showBox();
  },
  onShow: function() {
    onShowTimes(res => {
      this.setData({
        Date: res
      })
    })
  },
  onHide: function() {

  },

  onPullDownRefresh: function() {

  },

  onReachBottom: function() {

  },

  onShareAppMessage: function() {

  }
})